﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace Chinaer.Win
{
    public partial class AddShangJia : Form
    {
        public AddShangJia()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                Chinaer.Model.Common.JsonResult jsonResult = new Model.Common.JsonResult();
                DTO.ShangJiaDTO shangJiaDTO = new DTO.ShangJiaDTO();
                shangJiaDTO.LoginName = this.txtLoginName.Text.Trim();
                shangJiaDTO.LoginPassword = this.txtLoginPassword.Text.Trim();
                jsonResult = ChinaerService.Instance.RegisterShangJia(shangJiaDTO);
                MessageBox.Show("注册成功");
            }
            catch (Exception ex)
            {
                MessageBox.Show("注册失败");
            }

        }
    }
}
